
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>用户中心</title>
<link rel="stylesheet" type="text/css" href="../../Resours/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../../Resours/css/User.css">
</head>
<body>
<div id="head">
	<button class="btn btn-primary btn-sm" onclick="location.href='EditUser.html'">修改个人信息</button>
</div>
<div id="center">
<table class="table table-bordered table-hover" >
	<tbody>
	
	</tbody>
</table>


</div>
<script src="../../Resours/js/jquery-3.3.1.min.js"></script>
<script >
function fun1() {
    
	 var bodys='';
           //发送ajax请求
           $.get("/Shopx/UserServlet?action=user",function (data) {
        	   console.log('data:',data.u_name)
        	   bodys+=`
        		   <tr>
              		<td>用户名</td>
              		<td>
              			<span>${data.u_name}</span>
              		</td>
	              	</tr>
	              	<tr>
	              		<td>电话号码</td>
	              		<td>
	              			<span>${data.u_phone}</span>
	              		</td>
	              	</tr>
	              	<tr>
	              		<td>地址</td>
	              		<td>
	              			<span>${data.u_address}</span>
	              		</td>
	              	</tr>
	              	<tr>
	              		<td>余额</td>
	              		<td>
	              			<span>${data.u_money}</span>
	              		</td>
	              	</tr>
        	   `
        		   $("tbody").html(bodys);
           },'json');
    }
fun1();

</script>
</body>
</html>